extends Node

var all_active = true

signal all_flowerspots_activated
signal loading(status)
	
func check_status():
	all_active = true
	print ("FlowerspotStatus load")
	
	var spots = get_tree().get_nodes_in_group("group_flowerspot")
	
	
	for s in spots:
		if not s.is_queued_for_deletion():
			
			if s.status == "inactive":
				all_active = false
	
	print(all_active)
	
func on_load():
	check_status()
	print ("on load: all flowerspots active = " + str(all_active))
	emit_signal("loading", all_active)
	

func on_flowerspot_activated():
	check_status()
	print ("all flowerspots active = " + str(all_active))
	emit_signal("all_flowerspots_activated")
